<template>
    <view class="mine-view">
        <view class="title-text">
            <view>我的项目</view>
            <i class="el-icon-arrow-right"></i>
            <view class="text-info">项目详情</view>
        </view>
        <view class="tab-view">
            <el-button @click="tabIndex = 1" :class="tabIndex == 1 ? 'but-project-opt' : 'but-project'">项目信息</el-button>
            <el-button @click="tabIndex = 2" style="margin-left: 20px"
                :class="tabIndex == 2 ? 'but-project-opt' : 'but-project'">收益信息</el-button>
        </view>
        <view v-if="tabIndex == 2">
            <view class="amount-view">
                <view class="left">
                    <view class="left-amount">355555</view>
                    <view class="left-text">实际收益（元）</view>
                </view>
                <view class="right-img">
                    <image src="/static/pc/amount-right.png" class="amount-image"></image>
                </view>
            </view>
            <view class="grand">当前累计收益：<span style="color: #ff2615; font-size: 18px">8896</span>
                <span style="font-size: 12px; margin-left: 4px">元</span>
            </view>
            <view class="earnings-view" v-for="(i, index) in 3" :key="index">
                <view class="income-detail-left">
                    <image src="/static/pc/past-icon.png" class="income-image"></image>
                    <view class="income-detail-time">2024.01.20</view>
                </view>
                <view class="income-detail-right">+ 30</view>
            </view>
        </view>
        <view v-if="tabIndex == 1">
            <view class="info-name">辽宁中宇纵横融资租赁有限公司债权项目十期</view>
            <view class="type-view">
                <view class="info-type">预约购买</view>
                <image src="/static/pc/succeed-icon.png" class="type-image"></image>
                <view class="type-text">审核通过</view>
            </view>
            <view class="info-data">
                <view class="data-item">
                    <view class="text">约定回报（年化）</view>
                    <view class="numb" style="color: #FF453B;">9-9.9%</view>
                </view>
                <view class="data-item">
                    <view class="text">发行规模（万元）</view>
                    <view class="numb">7000</view>
                </view>
                <view class="data-item">
                    <view class="text">期限（月）</view>
                    <view class="numb">十八</view>
                </view>
            </view>
            <view class="personage-view">
                <view class="personage-item">
                    <view class="item-tit">预约日期：</view>
                    <view class="item-data">2024.12.31</view>
                </view>
                <view class="personage-item">
                    <view class="item-tit">协议类型：</view>
                    <view class="item-data">
                        电子协议
                    </view>
                    <view style="margin-left: 84px;">电子签名：</view>
                    <view class="item-data">
                        查看
                    </view>
                    <view class="anew">重签</view>
                </view>
                <view class="personage-item">
                    <view class="item-tit">协议编号：</view>
                    <view class="item-data">416546464</view>
                </view>
                <view class="personage-item" style="align-items: baseline;margin-top: 20px;">
                    <view class="item-tit">指定账户：</view>
                    <view class="item-data">
                        <view>宋志会 · 687728283883892828 慧</view>
                        <view>中国银行</view>
                    </view>
                </view>
                <view class="personage-item" style="align-items: baseline;margin-top: 20px;">
                    <view class="item-tit">个人账户：</view>
                    <view class="item-data">
                        <view>宋志会 · 687728283883892828 慧</view>
                        <view>中国银行</view>
                    </view>
                </view>
                <view class="personage-item" style="align-items: baseline;margin-top: 20px;">
                    <view class="item-tit">联系地址：</view>
                    <view class="item-data">
                        <view>宋志会 · 687728283883892828 慧</view>
                        <view>中国银行</view>
                    </view>
                </view>
            </view>
            <view class="bot-but">
                <view class="detail-status">
                    <image src="/static/pc/yulan-icon.png" class="left-image"></image>
                    预览协议
                </view>
                <view style="margin: 0 37px; color: #FF453B;">|</view>
                <view class="detail-status">
                    <image src="/static/pc/xiazai-icon.png" class="left-image"></image>
                    下载协议
                </view>
            </view>
        </view>
        <el-button class="bot-button">返回</el-button>
    </view>
</template>

<script>
export default {
    data() {
        return {
            tabIndex: 1,
        };
    },
    methods: {},
};
</script>

<style scoped lang="scss">
.mine-view {
    width: 100%;
    background: white;
    padding: 48px 54px 36px 40px;
    min-height: 610px;

    .title-text {
        font-family: PingFangSC, PingFang SC;
        font-weight: 600;
        font-size: 20px;
        color: #1f0c00;
        line-height: 28px;
        text-align: left;
        font-style: normal;
        @extend .row-start;

        .el-icon-arrow-right {
            color: #b1a69f;
            margin-right: 7px;
            margin-left: 7px;
            margin-top: 1px;
            font-size: 12px;
        }

        .text-info {
            font-weight: 400;
            font-size: 18px;
            color: #b1a69f;
        }
    }

    .tab-view {
        margin-top: 27px;
        @extend .row-start;

        .but-project {
            @extend .row;
            width: 81px;
            height: 41px;
            background: #f6f6f6;
            border-radius: 2px;
            font-weight: 400;
            font-size: 16px;
            color: #1f0c00;
        }

        .but-project-opt {
            @extend .row;
            width: 81px;
            height: 41px;
            background: #ff453b;
            border: none;
            border-radius: 2px;
            font-weight: 400;
            font-size: 16px;
            color: #ffffff;
        }
    }

    .amount-view {
        height: 112px;
        width: 100%;
        @extend .row-between;

        .left {
            margin-top: 45px;
            font-family: DINAlternate, DINAlternate;
            font-weight: bold;
            font-size: 26px;
            color: #ff442f;
            line-height: 30px;
            text-align: left;
            font-style: normal;

            .left-text {
                font-weight: 400;
                font-size: 12px;
                color: #69442e;
            }
        }

        .right-img {
            height: 100%;
            width: 136px;

            .amount-image {
                width: 100%;
                height: 100%;
            }
        }
    }

    .grand {
        margin-top: 24px;
        margin-bottom: 30px;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 14px;
        color: #69442e;
        line-height: 20px;
        text-align: left;
        font-style: normal;
    }

    .earnings-view {
        // margin-top: 15px;
        @extend .row-start;
        padding: 16px 0;
        border-top: 1px solid #f7e8e4;
        align-items: center;
        line-height: 22px;

        .income-detail-left {
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: 14px;
            color: #69442e;
            line-height: 20px;
            text-align: left;
            font-style: normal;
            display: flex;

            .income-image {
                width: 14px;
                height: 14px;
                margin-top: 4px;
                margin-right: 7px;
            }
        }

        .income-detail-right {
            margin-left: 195px;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: 16px;
            color: #ff2615;
            line-height: 22px;
            text-align: center;
            font-style: normal;
        }
    }

    .info-name {
        margin-top: 20px;
        font-weight: 600;
        font-size: 24px;
        color: #1F0C00;
    }

    .type-view {
        margin-top: 20px;
        @extend .row-start;

        .info-type {
            width: 56px;
            height: 21px;
            background: linear-gradient(270deg, #5860FF 0%, #2C32FF 100%);
            border-radius: 2px;
            @extend .row;
            font-weight: 400;
            font-size: 11px;
            color: #FFFFFF;

        }

        .type-image {
            width: 14px;
            height: 14px;
            margin: 0 6px 0 10px;
        }

        .type-text {
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: 12px;
            color: #00C86C;
            line-height: 17px;
            text-align: left;
            font-style: normal;
        }
    }

    .info-data {
        margin-top: 14px;
        @extend .row-start;

        .data-item+.data-item {
            margin-left: 58px;
        }

        .data-item {
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: 14px;
            color: #1F0C00;
            line-height: 20px;
            text-align: left;
            font-style: normal;

            .numb {
                color: #1F0C00;
                font-size: 28px;
                font-weight: 600;
                line-height: 20px;
                margin-top: 4px;
            }
        }
    }

    .personage-view {
        margin: 34px 0 45px 0;

        .personage-item+.personage-item {
            margin-top: 10px;
        }

        .personage-item {
            @extend .row-start;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: 14px;
            color: #B8ACA3;
            line-height: 20px;
            text-align: left;
            font-style: normal;

            .item-data {
                color: #2C1101;
            }

            .anew {
                @extend .row;
                margin-left: 10px;
                width: 44px;
                height: 24px;
                border-radius: 4px;
                border: 1px solid #FF2615;
                font-weight: 400;
                font-size: 12px;
                color: #FF2615;
                line-height: 17px;
            }
        }
    }

    .bot-but {
        margin-left: 28px;
        @extend .row-start;

        .detail-status {
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: 16px;
            color: #FF453B;
            line-height: 22px;
            text-align: left;
            font-style: normal;
            @extend .row-start;

            .left-image {
                width: 18px;
                height: 18px;
                margin-right: 6px;
            }
        }
    }

    .bot-button {
        margin-top: 300px;
        @extend .row;
        width: 179px;
        height: 54px;
        background: #FFFFFF;
        border-radius: 8px;
        border: 1px solid #FF453B;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 14px;
        color: #FF453B;
        line-height: 20px;
        letter-spacing: 1px;
        text-align: right;
        font-style: normal;
    }
}
</style>